function toLogin() {
    $('#loginForm').form({
        url: '/adminToLogin',
        onSubmit: function(){

        },
        success:function(data){
            loadVrifyCode();
            var result = eval('(' + data + ')');
            if (result.success) {
                window.location = "/admin/main";
            } else {
                $.messager.alert('提示',result.msg,'error');
            }
        }
    });
}

function loadVrifyCode() {//刷新验证码
    $(".vc-pic").attr('src', "/captcha?time=" + new Date().getTime());
}

